import request from "@/util/request";
export function getByRange(minLng, maxLng, minLat, maxLat) {
    return request({
        url: "/road/getByRange?minLng=" + minLng + "&maxLng=" + maxLng + "&minLat=" + minLat + "&maxLat=" + maxLat,
        method: "get",
    });
}

export function executeMatch(data,roadId,lng,lat,oriLng,oriLat,) {
    return request({
        url: "/road/match?roadId=" + roadId + "&lng=" + lng + "&lat=" + lat + "&oriLng=" + oriLng + "&oriLat=" + oriLat,
        method: "POST",
        data
    });
}


export function getShortestPath(startLng,startLat,endLng,endLat) {
    return request({
        url: "/road/shortestPath?startLng=" + startLng + "&startLat=" + startLat + "&endLng=" + endLng + "&endLat=" + endLat,
        method: "get",
    });
}


export function getShortestPathByObjectId(startId,endId) {
    return request({
        url: "/road/shortestPathByObjectId?startId=" + startId + "&endId=" + endId,
        method: "get",
    });
}
